import component.GraphicComponent;
import component.concreteComponent.TextBox;
import decorator.concreteDecorator.BorderDecorator;
import decorator.concreteDecorator.ScrollBarDecorator;

// 测试类
public class GuiExample {
    public static void main(String[] args) {
        // 创建文本框并添加边框和滚动条
        GraphicComponent textBox = new TextBox();
        textBox = new BorderDecorator(textBox);
        textBox = new ScrollBarDecorator(textBox);

        textBox.draw();
        // 输出:
        // Drawing a text box
        // Adding border to component
        // Adding scroll bar to component
    }
}